/**
 * Xinfei.com Inc.
 * Copyright (c) 2004-2023 All Rights Reserved.
 */
package com.xinfei.techplayprod.biz.mq.consumer;

import com.xinfei.techplayprod.biz.mq.MqConstant;
import com.xinfei.xfframework.common.starter.mq.MqConsumerListener;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.springframework.stereotype.Component;

/**
 * 消息消费样例程序，注意通过代码生成器生成的代码的时候，需要将此代码换成自己的
 *
 * @author Chengsheng.Li
 * @version $ MqConsumerDemo, v 0.1 2023/9/21 19:35 Chengsheng.Li Exp $
 */

@Component
@RocketMQMessageListener(consumerGroup = MqConstant.TEST_GROUP, topic = MqConstant.TEST_TOPIC)
@Slf4j
public class TestIntConsumerService extends MqConsumerListener<Integer> {

    @Override
    protected void doMessage(String topic, Integer body, MessageExt message) {
        log.info(topic + "," + body+",string");
    }
}